//
//  SEGWaitingViewController.m
//  SEGUhomeStandard
//
//  Created by 刘山 on 2018/3/22.
//  Copyright © 2018年 刘山. All rights reserved.
//

#import "SEGWaitingViewController.h"
#if __has_include(<SEGPlatform/UIViewController+YYAdd.h>)
#import <SEGPlatform/UIViewController+YYAdd.h>
#else
#import "SEGPlatform/UIViewController+YYAdd.h"
#endif

@interface SEGWaitingViewController ()
@property (nonatomic, strong) UIImageView *backgrooundView;
@end

@implementation SEGWaitingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navDisplayType = SEGNavigationBarDisplayTypeHide;
    NSArray* imagesDict = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"UILaunchImages"];
    NSString *launchImageName = nil;
    for (NSDictionary* dict in imagesDict){
        CGSize imageSize = CGSizeFromString(dict[@"UILaunchImageSize"]);
        if (CGSizeEqualToSize(imageSize, CGSizeMake([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)) && [@"Portrait" isEqualToString:dict[@"UILaunchImageOrientation"]]){
            launchImageName = dict[@"UILaunchImageName"];
        }
    }
    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:launchImageName]];
}
@end
